package com.example.demo.service.imp;

import com.example.demo.dao.IUser;
import com.example.demo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.demo.service.UserService;

import java.util.List;

@Service
public class UserServiceImp implements UserService {
    @Autowired
    private IUser iUser;
    @Override
   public int insertUser(User user){
       return iUser.insertUser(user);
   }

    @Override
    public List<User> getAll(User user) {
        return iUser.getAll(user);
    }

    @Override
    public int deleteUser(int id) {
        return iUser.deleteUser(id);
    }


    @Override
    public int updateUser(User user) {

        return iUser.updateUser(user);
    }
}
